//
//  MineDataViewController.m
//  TEst
//
//  Created by   丛熠超 on 2017/4/11.
//  Copyright © 2017年 Tongcheng. All rights reserved.
//

#import "MineDataViewController.h"
#import "DLPickerView.h"
#import "InputView.h"
#import "MineSignViewController.h"
#import "GiftView.h"
#import "AFNetworking.h"
#import "AddressPickerView.h"
//相机
#import <AVFoundation/AVCaptureDevice.h>
#import <AVFoundation/AVMediaFormat.h>
//相册
#import <AssetsLibrary/AssetsLibrary.h>
#define SCREEN [UIScreen mainScreen].bounds.size

#import "UIButton+AFNetworking.h"
#import "ChangeInfoOperator.h"
#import "GainInfoOperator.h"
#import "GainInfoModel.h"
#import "GainInfoDataModel.h"
#import "GainInfoJobModel.h"

@interface MineDataViewController ()<InputDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,AddressPickerViewDelegate>
@property (weak, nonatomic) IBOutlet UILabel *BaseLB;
@property (weak, nonatomic) IBOutlet UIButton *IconBtn;
@property (strong, nonatomic) IBOutlet UILabel *SignLB;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *Height;
@property (nonatomic, strong)UIView *touchview;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *SignLBHeight;
@property (weak, nonatomic) IBOutlet UIImageView *IconView;

@property (weak, nonatomic) IBOutlet UIButton *NameBtn;
@property (weak, nonatomic) IBOutlet UIButton *SexBtn;
@property (weak, nonatomic) IBOutlet UIButton *AgeBtn;
@property (weak, nonatomic) IBOutlet UIButton *AddressBtn;
@property (weak, nonatomic) IBOutlet UIButton *HeightBtn;
@property (weak, nonatomic) IBOutlet UITextField *NameTextField;
@property (weak, nonatomic) IBOutlet UIButton *SaleBtn;
@property (weak, nonatomic) IBOutlet UIButton *MarrayBtn;
@property (weak, nonatomic) IBOutlet UIButton *QQBtn;
@property (weak, nonatomic) IBOutlet UIButton *PhoneBtn;
@property (weak, nonatomic) IBOutlet UIButton *WeiboBtn;
@property (weak, nonatomic) IBOutlet UIButton *DotorBtn;
@property (weak, nonatomic) IBOutlet UIButton *WorkBtn;
@property (weak, nonatomic) IBOutlet UIButton *BirthdayBtn;
@property (weak, nonatomic) IBOutlet UIButton *Weightbtn;
@property (weak, nonatomic) IBOutlet UIButton *StarBtn;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *qqLabel;
@property (weak, nonatomic) IBOutlet UILabel *telLabel;
@property (weak, nonatomic) IBOutlet UILabel *wxLabel;

@property (nonatomic, strong)InputView *QQinput;
@property (nonatomic, strong)InputView *weiboinput;
@property (nonatomic, strong)InputView *phoneinput;
@property (nonatomic, assign)NSInteger temp;
@property (nonatomic ,strong) AddressPickerView * pickerView;
@end

#define OwnerSeparator      @"  -  "
#define TimeSeparator       @":"

@implementation MineDataViewController

- (void)setModel:(MineUserinfoDataModel *)model
{
    _model = model;
    UIGestureRecognizer *ges = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(GetIcon1)];
    [_IconView addGestureRecognizer:ges];
    _IconView.userInteractionEnabled = YES;
    [self.IconBtn setBackgroundImageForState:UIControlStateNormal withURL:[NSURL URLWithString:model.avatar] placeholderImage:nil];
    [self.IconBtn setTitle:model._id forState:UIControlStateNormal];
    self.nameLabel.text = [NSString stringWithFormat:@"%@,%@岁,%@cm,%@", model.sex, model.age, model.height, model.cityid];
    self.NameTextField.text = model.user_nicename;
    [self.SexBtn setTitle:model.sex forState:UIControlStateNormal];
    [self.AgeBtn setTitle:model.age forState:UIControlStateNormal];
    [self.AddressBtn setTitle:model.cityid forState:UIControlStateNormal];
    [self.HeightBtn setTitle:model.height forState:UIControlStateNormal];
    [self.SaleBtn setTitle:model.income forState:UIControlStateNormal];
    [self.MarrayBtn setTitle:model.married forState:UIControlStateNormal];
    if (model.qq.length == 0) {
        [self.QQBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.QQBtn setTitle:model.qq forState:UIControlStateNormal];
    }
    
    if (model.phone.length == 0) {
        [self.PhoneBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.PhoneBtn setTitle:model.phone forState:UIControlStateNormal];
    }
    
    if (model.weixin.length == 0) {
        [self.WeiboBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.WeiboBtn setTitle:model.weixin forState:UIControlStateNormal];
    }
    
    [self.DotorBtn setTitle:model.edu forState:UIControlStateNormal];
    [self.WorkBtn setTitle:model.job forState:UIControlStateNormal];
    [self.BirthdayBtn setTitle:model.birthday forState:UIControlStateNormal];
//  [self.Weightbtn setTitle:model. forState:UIControlStateNormal];
    [self.StarBtn setTitle:model.astro forState:UIControlStateNormal];
}

- (void)setupView
{
    _AddressBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _HeightBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _SaleBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _MarrayBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _QQBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _PhoneBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _WeiboBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _DotorBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _WorkBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _BirthdayBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _Weightbtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _StarBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _NameBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _SexBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    _AgeBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    
    UIButton *btn = [[UIButton alloc] initWithFrame:_SignLB.frame];
    [btn addTarget:self action:@selector(GetSign) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    _IconView.layer.cornerRadius = 50;
    _IconView.layer.masksToBounds = YES;
    [_IconView setImageWithURL:[NSURL URLWithString:_model.avatar] placeholderImage:nil];
    [_IconBtn setTitle:[NSString stringWithFormat:@"ID:%@", _model._id] forState:UIControlStateNormal];
    
    NSString *string;
    if ([_model.sex isEqualToString:@"1"]) {
        string = @"男";
    } else {
        string = @"女";
    }
    _BaseLB.text = [NSString stringWithFormat:@"%@,%@岁,%@cm,%@",string, _model.age, _model.height, _model.cityid];
    _SignLB.text = _model.monolog;
    _NameTextField.text = _model.user_nicename;
    [_SexBtn setTitle:string forState:UIControlStateNormal];
    [_AgeBtn setTitle:[NSString stringWithFormat:@"%@岁", _model.age] forState:UIControlStateNormal];
    [self.AddressBtn setTitle:_model.cityid forState:UIControlStateNormal];
    [self.HeightBtn setTitle:_model.height forState:UIControlStateNormal];
    [self.SaleBtn setTitle:_model.income forState:UIControlStateNormal];
    [self.MarrayBtn setTitle:_model.married forState:UIControlStateNormal];
    if (_model.qq.length == 0) {
        [self.QQBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.QQBtn setTitle:_model.qq forState:UIControlStateNormal];
    }
    
    if (_model.phone.length == 0) {
        [self.PhoneBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.PhoneBtn setTitle:_model.phone forState:UIControlStateNormal];
    }
    
    if (_model.weixin.length == 0) {
        [self.WeiboBtn setTitle:@"请设置" forState:UIControlStateNormal];
    }else{
        [self.WeiboBtn setTitle:_model.weixin forState:UIControlStateNormal];
    }
    
    [self.DotorBtn setTitle:_model.edu forState:UIControlStateNormal];
    [self.WorkBtn setTitle:_model.job forState:UIControlStateNormal];
    [self.BirthdayBtn setTitle:_model.birthday forState:UIControlStateNormal];
    //  [self.Weightbtn setTitle:model. forState:UIControlStateNormal];
    [self.StarBtn setTitle:_model.astro forState:UIControlStateNormal];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = self.config.userName;
    [self setupView];
    [self download];
    
//    GiftView *gift = [GiftView gainMineHeaderView];
//    gift.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
//    [self.view addSubview:gift];
    
    // Do any additional setup after loading the view from its nib.
}
//头像
- (IBAction)GetIcon:(UIButton *)sender {
    [self GetIcon1];
}

- (void)GetIcon1 {
    ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];
    if (author ==ALAuthorizationStatusRestricted || author ==ALAuthorizationStatusDenied){
        //无权限 引导去开启
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        if ([[UIApplication sharedApplication] canOpenURL:url]) {
            [[UIApplication sharedApplication] openURL:url];
        }
    }else{
        if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
            UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
            imagePickerController.delegate = self;
            imagePickerController.allowsEditing = YES;
            imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
            
            [self presentViewController:imagePickerController animated:YES completion:^{
                
            }];
        }
        else
        {
            NSLog(@"手机不支持相册");
        }
    }
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
    [picker dismissViewControllerAnimated:YES completion:NULL];
    UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
    _IconView.image = image;
   
}
//签名
- (void)GetSign {
    MineSignViewController *sign = [[MineSignViewController alloc] init];
    [self.navigationController pushViewController:sign animated:NO];
}
//昵称
- (IBAction)GetName:(id)sender {
    
}
//性别
- (IBAction)GetSex:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"男",@"女"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                    withSelectedBlock:^(id  _Nonnull item) {
                                        [self upDataWith:4 withBtn:sender withText:item];
    }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}

//年龄
- (IBAction)GetAge:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"] withSelectedBlock:^(id  _Nonnull item) {
        [self upDataWith:5 withBtn:sender withText:item];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}

- (AddressPickerView *)pickerView{
    if (!_pickerView) {
        _pickerView = [[AddressPickerView alloc]initWithFrame:CGRectMake(0, SCREEN.height , SCREEN.width, 250)];
        _pickerView.delegate = self;
    }
    return _pickerView;
}
- (IBAction)GetAddress:(id)sender {
    [self.view addSubview:self.pickerView];
    [self.pickerView show];
    [self GetAddressData:@"无"];
    
}
- (void)cancelBtnClick{
    NSLog(@"点击了取消按钮");
    [self.pickerView hide];
}
- (void)sureBtnClickReturnProvince:(NSString *)province City:(NSString *)city Area:(NSString *)area{
    NSString *text = [NSString stringWithFormat:@"%@%@%@",province,city,area];
    [self.AddressBtn setTitle:text forState:UIControlStateNormal];
    [self.pickerView hide];
}
- (void)GetAddressData:(NSString *)Province {
//    NSMutableDictionary *province = [NSMutableDictionary dictionary];
//    NSMutableDictionary *provinceid = [NSMutableDictionary dictionary];
//    NSMutableDictionary *city = [NSMutableDictionary dictionary];
//    NSMutableDictionary *cityid = [NSMutableDictionary dictionary];
    
    AFHTTPSessionManager *manger = [AFHTTPSessionManager manager];
    manger.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html", nil];
    NSMutableDictionary *param = [NSMutableDictionary dictionary];
    if ([Province isEqualToString:@"无"]) {
        
    } else {
        param[@"Province"] = Province;
    }
    [manger POST:[NSString stringWithFormat:@"%@user/getarea",kDomain] parameters:param progress:^(NSProgress * _Nonnull uploadProgress) {
    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSArray *array = [responseObject objectForKey:@"data"];
        for (NSMutableDictionary *dic in array) {
            
            
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
    }];
}

- (IBAction)GetHeight:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"155cm",@"160cm",@"165cm",@"170cm",@"175cm",@"180cm",@"185cm",@"190cm",@"195"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [self upDataWith:7 withBtn:sender withText:item];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetSalar:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"小于2000",@"2000-5000",@"5000-10000",@"10000-20000",@"20000以上"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [self upDataWith:8 withBtn:sender withText:item];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetMarray:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"未婚",@"已婚",@"丧偶"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [sender setTitle:item forState:UIControlStateNormal];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetQQ:(id)sender {
    _temp = 1;
    _QQinput = [InputView gainMineHeaderView];
    _QQinput.delegate = self;
    _QQinput.center = self.view.center;
    [_QQinput.InputTextField resignFirstResponder];
    [self.view addSubview:_QQinput];
}
- (IBAction)GetPhone:(id)sender {
    _temp = 2;
    _phoneinput = [InputView gainMineHeaderView];
    _phoneinput.delegate = self;
    _phoneinput.TypeLb.text = @"电话";
    _phoneinput.center = self.view.center;
    [_phoneinput.InputTextField resignFirstResponder];
    [self.view addSubview:_phoneinput];
}
- (IBAction)GetWeibo:(id)sender {
    _temp = 3;
    _weiboinput = [InputView gainMineHeaderView];
    _weiboinput.TypeLb.text = @"微博";
    _weiboinput.center = self.view.center;
    _weiboinput.delegate = self;
    [_weiboinput.InputTextField resignFirstResponder];
    [self.view addSubview:_weiboinput];
}
- (IBAction)GetDotor:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"初中及以下",@"高中及中专",@"大专",@"本科",@"硕士及以上"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [sender setTitle:item forState:UIControlStateNormal];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetWork:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"在校学生",@"军人",@"私营业主",@"企业职工",@"农业劳动者",@"政府机关／事业单位劳动者",@"其他"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [sender setTitle:item forState:UIControlStateNormal];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetBirthday:(UIButton *)sender {
    NSArray *year = @[@"1970",@"1971",@"1972",@"1973",@"1974",@"1975",@"1976",@"1977",@"1978",@"1979",@"1980",@"1981",@"1982",@"1983",@"1984",@"1985",@"1986",@"1987",@"1988",@"1989",@"1990",@"1991",@"1992",@"1993",@"1994",@"1995",@"1996",@"1997",@"1998",@"1999",@"2000",@"2001",@"2002",@"2003"];
    NSArray *mouth = @[@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12"];
    NSArray *day = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31"];
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[year,mouth,day]
                                                      withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@"-"]
                                                     withSelectedBlock:^(id selectedItem) {
                                                         [sender setTitle:[selectedItem componentsJoinedByString:@"-"] forState:UIControlStateNormal];
                                                     }
                                ];

    [pickerView show];
}
- (IBAction)GetWeight:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"40-45kg",@"45-50kg",@"50-55kg",@"55-60kg",@"60-65kg",@"65-70kg",@"70-75kg",@"75-80kg",@"80-85kg",@"85-90kg",@"90-95kg",@"95-100kg",@"100kg以上"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [sender setTitle:item forState:UIControlStateNormal];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (IBAction)GetStar:(UIButton *)sender {
    DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@"白羊座",@"金牛座",@"双子座",@"巨蟹座",@"狮子座",@"处女座",@"天秤座",@"天蝎座",@"射手座",@"摩羯座",@"水瓶座",@"双鱼座"] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:@";"]
                                                      withSelectedBlock:^(id  _Nonnull item) {
                                                          [sender setTitle:item forState:UIControlStateNormal];
                                                      }];
    pickerView.shouldDismissWhenClickShadow = YES;
    
    [pickerView show];
}
- (void)clicksureBtn:(UIButton *)btn {
    if (_temp == 1) {
        NSLog(@"%@", _QQinput.InputTextField.text);
    }
    if (_temp == 2) {
        NSLog(@"%@", _phoneinput.InputTextField.text);
    }
    if (_temp == 3) {
        NSLog(@"%@", _weiboinput.InputTextField.text);
    }
    [_QQinput removeFromSuperview];
    [_phoneinput removeFromSuperview];
    [_weiboinput removeFromSuperview];
}
- (void)clickcancleBtn:(UIButton *)btn {
    [_QQinput removeFromSuperview];
    [_phoneinput removeFromSuperview];
    [_weiboinput removeFromSuperview];
}

- (void)download
{
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    dic[@"token"] = self.config.token;
    dic[@"user_id"] = self.config.userId;
    GainInfoOperator *operator = [[GainInfoOperator alloc] initWithParams:dic];
    [self.networkingManager asyncTaskOnVC:self operator:operator successBlock:^(BaseModel *baseModel) {
        if ([baseModel.code isEqualToString:@"1"]) {
            NSLog(@"%@", operator);
        }
    } failBlock:^(BaseModel *baseModel) {
        
    }];
}

- (void)upDataWith:(NSInteger)row withBtn:(UIButton *)btn withText:(NSString *)text
{
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    dic[@"token"] = self.config.token;
    dic[@"user_id"] = self.config.userId;
    if (row == 1) {
    
    }else if (row == 2){
        
    }else if (row == 3){
        
    }else if (row == 4){
        dic[@"sex"] = text;
    }else if (row == 5){
        dic[@"age"] = text;
    }else if (row == 6){
        
    }else if (row == 7){
        dic[@"height"] = text;
    }else if (row == 8){
        dic[@"income"] = text;
    }else if (row == 9){
        
    }else if (row == 10){
        
    }else if (row == 11){
        
    }else if (row == 12){
        
    }else if (row == 13){
        
    }else if (row == 14){
        
    }else if (row == 15){
        
    }else if (row == 16){
        
    }else{
        
    }
    ChangeInfoOperator *operator = [[ChangeInfoOperator alloc] initWithParams:dic];
    [self.networkingManager asyncTaskOnVC:self operator:operator successBlock:^(BaseModel *baseModel) {
        [self showToastMessage:baseModel.msg];
        if ([baseModel.code isEqualToString:@"1"]) {
            if (row == 1) {
                
            }else if (row == 2){
                
            }else if (row == 3){
                
            }else if (row == 4){
                [btn setTitle:text forState:UIControlStateNormal];
            }else if (row == 5){
                [btn setTitle:text forState:UIControlStateNormal];
            }else if (row == 6){
                
            }else if (row == 7){
                [btn setTitle:text forState:UIControlStateNormal];
            }else if (row == 8){
                [btn setTitle:text forState:UIControlStateNormal];
            }else if (row == 9){
                
            }else if (row == 10){
                
            }else if (row == 11){
                
            }else if (row == 12){
                
            }else if (row == 13){
                
            }else if (row == 14){
                
            }else if (row == 15){
                
            }else if (row == 16){
                
            }else{
                
            }
        }
    } failBlock:^(BaseModel *baseModel) {
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
